package zelix.hack.hacks;

import net.minecraft.client.Minecraft;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import zelix.hack.Hack;
import zelix.hack.HackCategory;
import zelix.value.NumberValue;

public class AttackSpeed extends Hack {

    NumberValue speed;
    public AttackSpeed() {
        super("AttackSpeed", HackCategory.ANOTHER);
        speed = new NumberValue("Ticks", 1D, 0D, 5D);
        this.addValue(speed);
    }

    @Override
    public void onClientTick(TickEvent.ClientTickEvent event) {
        Minecraft.getMinecraft().player.getEntityAttribute(SharedMonsterAttributes.ATTACK_SPEED).setBaseValue(speed.getValue());
        //SharedMonsterAttributes.ATTACK_SPEED.
        //Minecraft.getMinecraft().player.resetCooldown();
    }
}
